﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;

/// <summary>
/// Summary description for AMSCKEditor
/// </summary>
public class AMSCKEditor
{
    private AMSCKEditor()
    {
    }

    const string CKEditorKey = "7ECC3C0F-38E0-4724-AF5F-2D8F5F7F9914";
    public static void RegisterCKEditor(Page page)
    {
        page.ClientScript.RegisterClientScriptInclude(CKEditorKey, page.ResolveUrl("~/ckeditor/ckeditor.js"));
    }

    public static string GetCreateCKEditorJs(string textAreaClientID)
    {
        return string.Format(
              "<script type=\"text/javascript\">\r\n"
            + "var editor = CKEDITOR.replace('{0}'); "
            //+ "CKFinder.SetupCKEditor(editor, '/ckfinder/');  //结合上传控件"
            + "</script>"
            , textAreaClientID);
    }
}
